<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script type="text/javascript" th:src="@{/static/layui/layui.js}"></script>
    <link rel="stylesheet" type="text/css" th:href="@{/static/layui/css/layui.css}"/>
</head>
<body>
<form th:each="t:${tea}" class="layui-form">
    <input th:type="hidden" th:name="tid" th:value="${t.tid}">
    <div class="layui-form-item" style="margin-top: 10px">
        <label class="layui-form-label">编号：</label>
        <div class="layui-input-inline">
            <input class="layui-input" type="text"autocomplete="off" lay-verify="required" th:value="${t.tchid}" th:name="tchid" disabled>
        </div>
    </div>
    <div class="layui-form-item" style="margin-top: 10px">
        <label class="layui-form-label">姓名：</label>
        <div class="layui-input-inline">
            <input class="layui-input" type="text"autocomplete="off" lay-verify="tname" th:value="${t.tname}" th:name="tname" disabled>
        </div>
    </div>
    <div class="layui-form-item" th:switch="${t.tgender}">
        <label class="layui-form-label">性别：</label>
        <div class="layui-input-block" th:case="'男'">
            <input th:name="tgender" title="男" type="radio" checked="" value="男" disabled>
            <input th:name="tgender" title="女" type="radio" value="女" disabled>
        </div>
        <div class="layui-input-block" th:case="'女'">
            <input th:name="tgender" title="男" type="radio"  value="男" disabled>
            <input th:name="tgender" title="女" type="radio" checked="" value="女" disabled>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">出生日期：</label>
            <div class="layui-input-inline">
                <input class="layui-input" id="test1" th:type="text"  th:value="${#dates.format(t.tbirthday,'yyyy-MM-dd')}" th:name="birthday" disabled>
            </div>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">政治面貌：</label>
        <div class="layui-input-block">
            <select th:name="pid" lay-filter="aihao" disabled>
                <option th:each="stu:${selpol}" th:value="${stu.pid}" th:text="${stu.pname}" th:selected="${t.pid==stu.pid}"></option>
            </select>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">民族：</label>
        <div class="layui-input-inline">
            <input name="username" class="layui-input" type="text"autocomplete="off" lay-verify="required" th:value="${t.tnation}" th:name="tnation" disabled>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">身份证号：</label>
        <div class="layui-input-inline">
            <input name="username" class="layui-input" type="text"autocomplete="off" lay-verify="tidnumber" th:value="${t.tcardid}" th:name="tcardid" disabled>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">手机号码：</label>
        <div class="layui-input-inline">
            <input name="username" class="layui-input" type="text"autocomplete="off" lay-verify="tphone" th:value="${t.tphone}" th:name="tphone" disabled>
        </div>
    </div>
    <div class="layui-form-item layui-form-text">
        <label class="layui-form-label">地址：</label>
        <div class="layui-input-block">
            <textarea class="layui-textarea" th:text="${t.taddress}" th:name="taddress" disabled></textarea>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">状态：</label>
        <div class="layui-input-block">
            <select th:name="tchstate" lay-filter="aihao" disabled>
                <option th:selected="${t.tchstate eq 0}" value="0" >在职</option>
                <option th:selected="${t.tchstate eq 1}" value="1">离职</option>
                <option th:selected="${t.tchstate eq 2}" value="2">休假</option>
            </select>
        </div>
    </div>
</form>
</body>
</html>
<script>
    layui.use(['form', 'layer', 'laydate'], function(){
        var form = layui.form
            ,layer = layui.layer
            ,laydate = layui.laydate,
            $=layui.jquery;
        //日期
        //常规用法
        laydate.render({
            elem: '#test1',
            trigger: 'click',
        });


    });
</script>